-------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\riley\Dropbox\DialysisAmbulanceFraud\JPE Submission\Final Submission\replication\logs/LIONS.log
  log type:  text
 opened on:  16 Jul 2024, 15:51:17

. 
. /*******************************************************************************
> LIONS.do
> 
> This code creates statistics on US attorney specialization using LIONS data
> *******************************************************************************/
. 
. *Load data case type data from the USAO National Caseload / LIONS Data (FY2021; source: https://www.justice.gov/usao/resources/foia-libra
> ry/national-caseload-data/2021)
. infix str district 1-10 str caseid 11-20 str cause_act 21-24 str ID 25-34 str create_date 35-45 str create_user 46-75 str update_date 76-
> 86 str update_user 87-116 using "${rawdatapath}gs_case_cause_act.txt", clear
(2,711,015 observations read)

. keep district caseid cause_act

. 
. *Getting whether each case is health care fraud
. gen hc=cause_act=="FRHC"

. collapse (max) hc, by(district caseid)

. 
. tempfile cases

. save `cases', replace
(file C:\Users\riley\AppData\Local\Temp\ST_5c7c_000001.tmp not found)
file C:\Users\riley\AppData\Local\Temp\ST_5c7c_000001.tmp saved as .dta format

. 
. *Load assignment data from the USAO National Caseload / LIONS Data (FY2021; source: https://www.justice.gov/usao/resources/foia-library/n
> ational-caseload-data/2021)
. infix str district 1-10 str caseid 11-20 str crthisid 21-30 str ID 31-40 str staffid 41-50 str position 51 str start_date 52-62 str end_d
> ate 63-73 str create_date 74-84 str create_user 85-114 str update_date 115-125 str update_user 126-155 using "${rawdatapath}gs_assignment
> .txt", clear
(12,895,517 observations read)

. 
. *Keep only lead attorney assignments
. keep district caseid staffid position

. keep if position=="L"
(2,358,243 observations deleted)

. duplicates drop

Duplicates in terms of all variables

(2,349,958 observations deleted)

. 
. *Merge assignment and case type
. merge m:1 district caseid using `cases'

    Result                      Number of obs
    -----------------------------------------
    Not matched                     5,107,928
        from master                 5,107,453  (_merge==1)
        from using                        475  (_merge==2)

    Matched                         3,079,863  (_merge==3)
    -----------------------------------------

. keep if _merge==3
(5,107,928 observations deleted)

. 
. *Getting case counts for each attorney
. gen cases=1

. collapse (sum) hc cases, by(staffid)

. 
. *Keep only attorneys with at least one health care fraud case
. keep if hc>=1
(8,625 observations deleted)

. 
. su hc, d // Referenced in Section 6.2, Paragraph 4

                          (sum) hc
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            1              1       Obs               1,126
25%            2              1       Sum of wgt.       1,126

50%            5                      Mean           17.07549
                        Largest       Std. dev.       39.1971
75%           15            355
90%           41            375       Variance       1536.413
95%           72            423       Skewness        6.11902
99%          200            525       Kurtosis        55.4758

. 
. gen hc_share=hc/cases

. su hc_share if hc>=1, d // Referenced in Section 6.2, Paragraph 4

                          hc_share
-------------------------------------------------------------
      Percentiles      Smallest
 1%     .0002252       .0000799
 5%     .0007415       .0001245
10%     .0013624       .0001289       Obs               1,126
25%     .0044004       .0001424       Sum of wgt.       1,126

50%     .0181818                      Mean           .0974779
                        Largest       Std. dev.      .1926068
75%     .0790698              1
90%     .3076923              1       Variance       .0370974
95%     .5454546              1       Skewness       2.939895
99%            1              1       Kurtosis       11.77825

. 
. log close
      name:  <unnamed>
       log:  C:\Users\riley\Dropbox\DialysisAmbulanceFraud\JPE Submission\Final Submission\replication\logs/LIONS.log
  log type:  text
 closed on:  16 Jul 2024, 15:52:22
-------------------------------------------------------------------------------------------------------------------------------------------
